<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*{margin:0;padding:0;}
.box{
	width:200px;height:100px;
	border:1px solid #000;
	margin-top:50px;
}
.bd{
	text-align:center;
}
.content{
	display:inline-block;
	margin:0 auto;
	text-align:left;
}
</style>
</head>
<body>

<div class="box">
	<div class="bd">
		<div class="content">
			<div>文字</div>
		</div>
	</div>
</div>

<div class="box">
	<div class="bd">
		<div class="content">
			<div>很多的文字很多的文字很多的文字很多的文字很多的文字</div>
		</div>
	</div>
</div>
	
</body>
</html>
